#include "Handle.h"
#include "modelerdraw.h"
#include <FL/gl.h>

Handle::Handle(void)
{
}

Handle::Handle( int _code, double x, double y, double z, int _link )
{
	code = _code;
	position[0] = x;
	position[1] = y;
	position[2] = z;
	position[3] = 1;
	link = _link;
	c = vl_1;
}

Handle::~Handle(void)
{
}

void Handle::setCode( int c )
{
	code = c;
}

void Handle::draw( void )
{
	draw(2.0);
}

void Handle::draw( float size )
{
	glPointSize(size);
	glBegin(GL_POINTS);
	setDiffuseColor( 1.0, 0.0, 0.0 );
	glVertex3f(position[0], position[1], position[2]);
	glEnd();
}

void Handle::setC( Vec4d &_c )
{
	c = _c;
	c[3] = 0;
}

Vec4d Handle::getC( void )
{
	return c;
}